package org.chuan.hisports.service.Imp;

import org.chuan.hisports.service.PhoneCode;
import org.springframework.stereotype.Service;

@Service
public class PhoneCodeImp implements PhoneCode {
    @Override
    public String creatCode(String phone) {
        //生成一个随机的四位数字
        int number = (int) (Math.random()*9000+1000);
        String code = String.valueOf(number);
        System.out.println(code);
        return code;
    }
}
